Repository navigation
docs(skills): a line-add action sets the price; a self-tied create gets a current_user default - #34019
Conversation
…ts a current_user default objectstack-ui rules/actions.md: an action that inserts a child line reads the price from the source the build declares (or takes it as a required param); lookupAutofill and a stored expression do not fill it on a server-side insert. objectstack-data rules/security.md: a check over a field the request never names refuses a plain create; defaultValue 'current_user' on the tying user field fills it before check is judged. One eval case per rule; both token ratchet rows paid down by true restatement first, then pinned at the measurement. Claude-Session: https://claude.ai/code/session_01ADHkmQ2cXsNaBaNbjBDxsA Co-authored-by: Claude <noreply@anthropic.com>
Measured on the engine: a stored expression over an unsent unit_price persists an empty amount, so the rule text, its eval and the ratchet row say that instead of naming a zero. Claude-Session: https://claude.ai/code/session_01ADHkmQ2cXsNaBaNbjBDxsA Co-authored-by: Claude <noreply@anthropic.com>
…-i6qv7j # Conflicts: # skills/objectstack-data/evals/hooks-security-seeds-datasources.json
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract reviewServed-tier: Read, not reviewed (origin/main at 240e9ab; none of these code files changed since the first reading at a3aa1d2): packages/objectql/src/engine-insert.ts, engine-defaults-and-autonumbers.ts, hook-run-as.ts; packages/runtime/src/action-execution.ts, domains/mcp.ts; packages/plugins/plugin-security/src/security-plugin-authz-middleware.ts, insert-check-post-image.test.ts; packages/lint/src/stored-expression-inputs.ts; packages/spec/src/data/field.zod.ts; the sibling skill files named below. ① Derived judgmentsEvery taught behaviour was tested against main's code. Rule 1, actions.md
Rule 2, security.md
Card asks not taught
② Semver level
③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. skills/objectstack-ui/rules/actions.md: true against main, clear, and placed where the add-line action and its params are written. The example mirrors the file's existing script action. Computing the price, with no optional price param, is the right call: the body runs elevated, so an optional override would let a persona write a price their field grant denies. skills/objectstack-data/rules/security.md: true, four lines, directly under the policy they explain. It agrees with Eval case 18 (ui): self-consistent. All four Eval case 21 (data): self-consistent. All three Ratchet and changeset: the two rows and their comments agree with the measured bytes; the changeset body describes the tree. Contradiction grep over Nits (no effect on the contract):
Implemented-by: VERDICT: PASS |
…the grid rule names its scope The Add Line action sets refreshAfter and refuses a product it cannot find; the hook sentence says an import with automations off skips hooks; SKILL.md's line-item grid paragraph says its no-button rule is about the grid and points a record-header insert at rules/actions.md. Both ratchet rows re-pinned at the measurement. Claude-Session: https://claude.ai/code/session_01ADHkmQ2cXsNaBaNbjBDxsA Co-authored-by: Claude <noreply@anthropic.com>
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Contract reviewServed-tier: Delta record. Record 6897741755 (head 31a2d6d) stands as written except where this one reopens it. Judged here: the single commit 0d221b0 on parent 31a2d6d, and the net diff against main (seven files, +132 −16). Read, not reviewed (origin/main at e71ecc1): packages/spec/src/ui/action.zod.ts, skills/objectstack-data/references/data-hooks.md. ① Derived judgmentsThe commit touches three files:
Nothing the commit adds contradicts main's code or a sibling skill. ② Semver levelUnchanged: ③ Boundary flags
④ Design judgmentNo must-fix, no should-fix. skills/objectstack-ui/rules/actions.md: the example is now complete on its own terms: it refuses a missing product before writing, and it refreshes the invoice whose roll-up it moved. The hook sentence is accurate with its exception. skills/objectstack-ui/SKILL.md: one clause, true, in the paragraph where the apparent conflict sat. It scopes the existing rule without weakening it. scripts/check-skills-token-ratchet.mjs: the two re-pinned rows and their comments agree with the measured bytes. Nits (no effect on the contract):
Implemented-by: VERDICT: PASS |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv 维护者速读
席位核对Verdict: ACCEPT, held for the maintainer · head
|
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Serial note for the maintainer: this PR and PR #34105 (card #33566) both edit |
|
domain:skills#2 · os-steve · session_01ADHkmRxXmVQ41fqnaTPGAv Landing at 2026-11-16T01:51Z: Serial note (6900101001): PR #34105 also adds eval id 21 to |
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43788769507 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
Requested by Steve · project thread
Fixes #33978
Clause-②: no
Metadata-protocol: none
维护者速读
check绑定当前用户的字段时,给该字段设defaultValue: 'current_user',用户只说「加一个任务」也能建成。各配一条评测用例。skills/objectstack-ui/rules/actions.md(新段落与示例)→skills/objectstack-data/rules/security.md(own_tasks策略与四行说明)→scripts/check-skills-token-ratchet.mjs(两行天花板与算式)。node scripts/check-skills-token-ratchet.mjs,预期 actions.md 显示 2808 / 2808、security.md 4041 / 4041,全部通过。What changes
skills/objectstack-ui/rules/actions.md§ Action Parameter Patterns: An action that adds a child line sets its price.lookupAutofillfills only the form and the grid, and a storedexpressionreads only its own row, so a body insertinginvoice,productandquantityalone stores noamount. Read the price from the source the build declares, or take it as arequiredparam where the persona sets prices. Oneos:checkexample (crm_add_invoice_line,type: 'script', paramsproductandquantityborrowed withobjectOverride: 'invoice_line', a body withapi.read+api.writethat readsproduct.list_price, throws when the product is not found, and inserts the line;refreshAfter: true, since the invoice's roll-up total moves). Lines also written past the action (API, an agent, an import — one with automations off skips hooks) get the price from abeforeInserthook on the line,runAs: 'system'when the writer cannot read it.skills/objectstack-ui/SKILL.md§ line-item grid behaviors: one clause scoping its "never add an 'Add line' button" to the grid, pointing a record-header action that inserts a priced line to rules/actions.md, so the two do not read as contradicting each other.skills/objectstack-data/rules/security.md§ Row-Level Security: the example's second policy becomes the insert-onlyown_tasks(check: 'assignee == current_user.id', fieldtask.assignee: { type: 'user', defaultValue: 'current_user' }), followed by four lines: acheckover a field the request never names refuses a plain create;defaultValue: 'current_user'fills an omitteduserfield beforecheckis judged.check.relationships.mdandfield-types.mduntouched.locationsis an array of surfaces:" (the H2 nameslocations, the table header says Surface); theopensInNewTabH3 tail "— async / computed redirect" (its paragraph opens "A redirect URL computed after a fetch"); ", holes in either" on thehelpTextbullet (the bullet above listsdescriptionand a param'shelpTextamong the{{ }}copy holes).org_isolationexample policy. A select-onlyusingpolicy is still shown twice in § Membership keys;current_user.organization_idkeeps its placeholder-table row; the tenant predicate is the Layer 0 wall in § Platform-global objects.skills/objectstack-ui/evals/views-apps-actions-pages.jsoncase 18 (the add-line action);skills/objectstack-data/evals/hooks-security-seeds-datasources.jsoncase 21 (the self-tied create; it follows case 20, which docs(skills): roll-up guidance resolves security-rollup-source-unreadable before finishing #33954 landed, byte-identical after the merge of main). Everymust_containappears verbatim in itsexpected_output; bothmust_not_containlists are empty.scripts/check-skills-token-ratchet.mjs: three rows moved to the measurement (actions.md, security.md, objectstack-ui SKILL.md), arithmetic in the row comments. The review-round additions (35 + 24 tokens) had no true duplicate to cut, so they rest on the ruling's second half..changeset/33978-line-price-and-self-tied-create.md:'@objectstack/skills': patch.Tests
Measured on
origin/mainbefore writing (b8ac0e2):defaultValue: 'current_user'is a runtime token on auserfield (packages/spec/src/data/field.zod.ts, thedefaultValuedescribe), resolved per request inpackages/objectql/src/engine-defaults-and-autonumbers.ts.beforeInserthooks, and the RLScheckjudges that post-hook row (postHookWriteImageCheck; pinned bypackages/plugins/plugin-security/src/insert-check-post-image.test.ts).defaultValueenvelope and a storedexpressionread only the row being written, so neither can read the product's price;lookupAutofillis client-side only.packages/runtime/src/action-execution.ts,isSystem: true); hooks run as the operator unlessrunAs: 'system'(packages/objectql/src/hook-run-as.ts).Scratch proof (uncommitted vitest file on the insert-check-post-image harness, deleted after) — 5/5 passed
Acceptance notes
describeServedObject,packages/runtime/src/domains/mcp.ts) serves name, type, label, required, readonly, system, options anddefaultValueper field, and nodescription, so that route has no measured agent consumer. It does servedefaultValueand tells the agent to omit the field to get it, which is the taught path.requiredparam where the persona sets prices").unit_pricefor a persona whose field grant denies editing it (the text makes no claim about it).field-types.md'slookupAutofillparagraph still ends at "Client-side only" with no pointer to the new rule; left out to keep to two rule files.skills/**text was authored and committed by an at-tier (CONTRACT_REVIEW_TIER) subagent in the same worktree and branch; push, gates, relay writes and the report stay with the thread.Verification
Token counts,
ceil(utf8 bytes / 4):rules/actions.mdrules/security.mdobjectstack-ui/SKILL.md(priced bytes, stamp line excluded)skills/*/SKILL.md(240e9ab vs head)skills/bundle (ratchet, 240e9ab vs head)Local gate union at head
0d221b0(origin/main240e9ab merged in;node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack, every listed command run, exit captured before any pipe):pnpm check:dual-build-cjs-loadsexit 3, PREREQUISITE NOT MET (reads every package'sdist/; this worktree built only the spec, client, client-react and plugin-security closures). Declared narrowing; CI carries it.--ranreconciliation: "65 derived famil(ies) accounted for — 64 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3)". The union at the previous heads read the same (63 derived, 62 run, 1 NOT MEASURED at both18e323band31a2d6d).0d221b0, each exit 0:pnpm --filter @objectstack/spec check:skill-docs("Skill docs in sync"),check:skill-refs("9 generated files in sync with packages/spec"),check:skill-examples("347 prose examples type-check across 3 surface(s)", after a spec rebuild),node scripts/check-skills-token-ratchet.mjs("57 authored bundle file(s) within their ceilings") and--self-test("104 cases pass"),pnpm check:nul-bytes,git diff --check.test:repo(CI'sTest Core); the diff touches no test.